<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F().cls</title>
<link type="text/css" rel="stylesheet" href="../css/admin.css" />
<link type="text/css" rel="stylesheet" href="../css/item_show.css" />
<script type="text/javascript" src="../../1st.js"></script>
<script type="text/javascript" src="../../1st.highlight.js"></script>
</head>
<body id="split">
<div id="content">
	<div rel="F.param">
		<h2><span>返回值:</span>F().cls</h2>
					<h3>概述 : 设置或获取className</h3>
						
			<div class="desc">
				<div class="longdesc"><pre>设置元素的className，没有参数时获取元素的样式。</pre></div>
			</div>
							<h3>语法1：F().cls(className)</h3>
							<div>描述：设置className</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>className</strong></td><td>String</td><td>css类名</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>fdom</td><td>返回DOM链</td></tr>
			</table>
					<h3>语法2：F().cls(exp)</h3>
							<div>描述：查找className符合exp的对象</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>exp</strong></td><td>String</td><td>css类名表达式</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>fdom</td><td>返回一个新的fdom</td></tr>
			</table>
					<h3>语法3：F().cls()</h3>
							<div>描述：获取className</div>
						<table class="args">
				<!--caption>参数列表：(0)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>String</td><td>css类名</td></tr>
			</table>
				<div class="example">
			<h3>示例 : </h3>
							<h5 xmlns="">CSS代码:</h5>
				<pre xmlns=""><code id="cssbox"></code></pre>
						
							<h5 xmlns="">HTML代码:</h5>
				<pre xmlns=""><code id="htmlbox"></code></pre>
									
				<h5 xmlns="">JS代码:</h5>
				<pre xmlns=""><code id="jsbox"></code></pre>
										
				<h5 xmlns="">结果:</h5>
				<pre xmlns=""><code id="resultbox"></code><code></code></pre>
					</div>
		<div style="text-align:right">
			
					
				<button onclick="window.open('../codepages/16.html');">运行代码</button>
						
		</div><br/>	
		<div>
			<h3>同类参考 :</h3>
			<div>
							<span><a href='13.html'>F().css</a></span>&#12288;|&#12288;							<span><a href='153.html'>F().px</a></span>&#12288;|&#12288;							<span><a href='160.html'>F().float</a></span>&#12288;|&#12288;							<span><a href='130.html'>F().ps</a></span>&#12288;|&#12288;							<span><a href='20.html'>F().opacity</a></span>&#12288;|&#12288;							<span><a href='94.html'>F().align</a></span>&#12288;|&#12288;							<span><a href='149.html'>F().border</a></span>&#12288;|&#12288;							<span><a href='180.html'>F().cursor</a></span>						</div>
		</div>
	</div>
</div><br />

<textarea id="css" style="display:none;">.box{width:100px; height:50px; background-color:red; color:blue;}</textarea>
<textarea id="html" style="display:none;"><div id="box">testbox<b class="inbox">888</b></div></textarea>
<textarea id="js" style="display:none;">F("box").cls("box");
alert(F("box").cls());
alert(F("box").cls(".inbox").tag);</textarea>
<textarea id="result" style="display:none;">"box"
"b"</textarea>


<script type="text/javascript">
var css = F('css').val();
var html = F('html').val();		
var js = F('js').val();
var result = F('result').val();
css && F('cssbox').highlight(css, "css");
html && F('htmlbox').highlight(html, "html");
js && F('jsbox').highlight(js, "js");
result && F('resultbox').highlight(result,"js");
</script>

</body>
</html>